Repository navigation
Make layout and elements far less fixed - #5
Merged
Merged
Conversation
…round A render of a pushed report (exported to PDF through the Sigma API) showed a long title clipped inside its fixed 64px box: a markdown H1 is ~40px in Sigma's default theme. - Titles, headings and text are sized from their characters and the width of the cell they land in. Heights are resolved in the layout flow, where width is finally known. - Titles are bold 28px spans and headings 20px, not markdown H1/H3. - Sigma tables do not paginate: they show a window of the first rows. table() takes rows= (default 10) to size the window from a measured 20px row + ~130px chrome, and h='fill' takes the rest of the page. fill is rejected inside rows and stacks. - The report page background is white (theme.page_background) instead of the app gray. - Tests: long-form report (wrapping title, narrow cell, rows=5, fill), 5 new negative cases. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The layout was a flow of fixed-height blocks with a two-level row/stack limit, tables could not run over several pages, most Sigma chart kinds were unmodeled, and raw() took unchecked JSON. Each of those is addressed. - Layout is a recursive tree: rows and stacks nest to any depth. Heights are measured up (natural height from children, text sized from its width) and then shared out. flex() and h='fill' take a weighted share of leftover height. at() pins an element outside the flow (overlap must be declared, and is excluded from the geometry check), page_break() forces a page. The rewrite reproduced the old output on every existing report. - Tables over several pages: table(window=[a, b]) shows rows a..b through a hidden RowNumber() column and a range filter (verified in Sigma), and table_pages() stacks windows with page breaks. simple_dashboard takes table_page_count. - Every size and calibration constant (page size, margins, element heights, type sizes, text and table metrics) is a project setting (sigma_report_settings); unknown keys fail. - An element-kind registry (kinds.sql) is generated from Sigma's schema by scripts/generate_kinds.py (CI checks it is current). raw() and extend() reject unknown kinds, missing required properties and misspelt properties at dbt parse. - Typed macros for combo (with secondary axis), waterfall, box, funnel, gauge, treemap, sankey, point/region/geography maps, progress, button and embed, built on one channel_element assembler. Number literals work as fields. - Tests: new flexible-layout report, settings-override step, 62 negative cases, kinds tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Brings in report presets (#3). Both sides added independent test helpers and checks (kept). The preset goldens move only because they now pick up the title fix, content-sized heights and white page background from #2, which had been merged into the stacked branch rather than main. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mattsenicksigma
changed the base branch from
feat/layout-heights-and-title
to
main
October 13, 2026 01:11
mattsenicksigma
added a commit
that referenced
this pull request
Oct 13, 2026
…ports Aligns the two. Resolved: report() keeps both settings-driven defaults and schedules; request_body() strips schedules and any _-prefixed bookkeeping; schema.yml keeps #5's entries plus #6's actions/schedule entries (and the report schedules argument). button() was defined in both: #5's thinner copy is dropped, #6's action-aware button is the one macro, and its height is now the button_h project setting. Goldens regenerate for the tree layout. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A table element has no pagination or row-limit property, which is what the windows (table_pages) work around. But Sigma can also expand a table to all its rows at render time via flow="paginated" on the layout entry - a separate feature, verified live while aligning the open PRs. Reword README, design notes, macro comments and schema descriptions so they say what is true. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
mattsenicksigma
added a commit
that referenced
this pull request
Oct 13, 2026
…numbers Re-applies #4's features on the tree layout: paginate= on table / pivot_table (flow="paginated" on the layout entry), the rule that a paginated element is the last block on its page (and not in a row, stack or panel), row(lead=), page_number() and report(page_numbers=). report_from_args now forwards page_numbers and schedules. check_layout keeps #4's paginated-flow checks and #5's overlap allowance. schema.yml gains the new arguments (in signature order, which dbt validates). Goldens regenerate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
mattsenicksigma
added a commit
that referenced
this pull request
Oct 13, 2026
Main now has the tree layout, settings and element registry (#5). Conflicts were additive: the README component table (filter_by_value added to the Report row), the column-reference walker in the test macros (kept both the typed columnIds handling and the list-filter exclusion), and the assert_reports model list. Goldens regenerate for the new layout. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses critique #4: the layout and element ceiling is lower than real reports need (flow layout with estimated heights, no multi-page tables, most chart kinds unmodeled,
raw()= hand-written unchecked JSON).What changed
1. The layout is a tree. Elements,
row,stack,at()andpage_break()are blocks; rows and stacks nest to any depth. Width flows down; height is measured up (measure: natural height, text sized from its width, flex weight) and then shared out (place). The rewrite reproduced the previous engine's output on every existing report (the only golden that moved is the leaderboard, whose chart height now follows the unified default).2. Flexible heights.
flex(block, weight, min)andh='fill'take a weighted share of leftover height (flex-grow semantics); a block with a flexible child is flexible, so "fill the page" works through any nesting.3.
at()/page_break(). Pinning is an explicit, checked exception: it must lie inside the content area, overlap has to be declared (overlap=true) and that declaration reaches the geometry check through a_-prefixed key that never goes to Sigma.4. Tables over several pages. Found by experiment: Sigma can't paginate a table, but a
RowNumber()column plus a number-range filter shows an exact row window, and Sigma accepts a hidden column for the filter.table(window=[a, b])andtable_pages(rows_per_page=, total_rows=)stack windows with page breaks.simple_dashboard(table_page_count=)uses it.5. Every constant is a project setting (
sigma_report_settings): page size, margin, gap, element heights, type sizes, and the text/table calibration numbers (the ones most likely to be wrong for another theme or font). Unknown keys fail at parse; per-call arguments win.6. Element registry + checked
raw().scripts/generate_kinds.pygeneratesmacros/elements/kinds.sqlfrom Sigma's own schema (29 kinds; CI fails if it is stale).raw()/extend()now reject an unknown kind, a missing required property or a misspelt property atdbt parse, listing what Sigma allows.7. Typed macros for the rest of the chart family: combo (with secondary axis), waterfall, box, funnel, gauge, treemap, sankey, point/region/geography maps, plus progress, button and embed, on one
channel_elementassembler. Number literals ('0') work as fields.Verification
at(), a 90-row table over three pages (30 per page, correct windows, hidden column not shown, true total in each summary bar), combo with secondary axis, treemap, funnel, waterfall, gauge and box. Sigma's dry run accepted the report. The combo chart's flat line (no secondary axis) was found this way and fixed.--warn-error: goldens identical on both, 62 negative cases (was 41), new step for settings overrides, kinds-registry check🤖 Generated with Claude Code